package com.bgs.service.impl;

import com.bgs.entity.Recyclingorder;
import com.bgs.entity.Store;
import com.bgs.mapper.RecyclingorderMapper;
import com.bgs.service.RecyclingorderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class RecyclingorderServiceImpl  implements RecyclingorderService {
    @Autowired
    RecyclingorderMapper recyclingorderMapper;
    @Override
    public List<Recyclingorder> load(Integer curNow,Integer userId) {
        List<Recyclingorder> recyclingorders = recyclingorderMapper.load(curNow,userId);
        return recyclingorders;
    }
    //取消订单
    @Override
    public void qxdd(Integer roId) {
        recyclingorderMapper.qxdd(roId);
    }
    //
    @Override
    public Recyclingorder find(Integer roId) {
        Recyclingorder recyclingorder = recyclingorderMapper.find(roId);
        return recyclingorder;
    }

    @Override
    public List<Store> getallshop() {
        List<Store> storeList = recyclingorderMapper.getallshop();
        return storeList;
    }

    @Override
    public Store findshop(String storeId) {
        Store store1 = recyclingorderMapper.findshop(storeId);
        return store1;
    }

    @Override
    public void addorder(Recyclingorder recyclingorder) {
         recyclingorderMapper.addorder(recyclingorder);

    }
}